function execute(serviceObj:Object, responser, index:Number)
{
	Packages.log(this._name+".execute");
	
	var loadVars:LoadVars=new LoadVars();

	// loadVars.addRequestHeader("accept", "application/json");

	loadVars.responser=responser;
	loadVars.index=index;

	loadVars.onData=onDataHandler;
	loadVars.onHTTPStatus=onHTTPStatusHandler;
	// loadVars.onLoad=onLoadHandler;

	var loadPath:String;
	loadPath=Packages.system.mlf.GateKeeper.accessSystemConfig("httpRequest")+"/"+serviceObj.method;
	if (serviceObj.params!=null)
	{
		// The params is appended in the loading url
		var sessionId:String;
		if (loadPath.indexOf("?")>-1)
		{
			loadPath+="&";
		}
		else loadPath+="?";
		for (var a in serviceObj.params)
		{
			// params[a] needs re-encode if it is Chinese character
			if (a!="sessionId") loadPath+=a+"="+serviceObj.params[a]+"&";
			else sessionId=serviceObj.params[a];
		}
		// loadPath=loadPath.substr(0, loadPath.length-1);
		loadPath=loadPath+"sessionId="+sessionId;
		/*// The params is iterated in the loadVars object
		for (var a in params)
		{
			loadVars[a]=params[a];
		}*/
	}

	Packages.log("loadPath: "+loadPath);

	loadVars.load(loadPath);
}

function onDataHandler(src:String)
{
	Packages.log("onDataHandler: "+src);

	var rst:Object=new Object();
	rst.index=this.index;

	if (src!=null)
	{
		// this.decode(src);
		// this.loaded=true;
		// if condition - json type
		if (src.substr(0, 1)=="{")
		{
			var jsonObj=Packages.services.JSONParser.parse(src);
			rst.data=jsonObj;
		}
		else rst.data=src;
	}
	
	this.responser.handleRequestResult(rst);
}

function onHTTPStatusHandler(httpStatus:Number)
{
	Packages.log("onHTTPStatusHandler: "+httpStatus);
}